import { request, requestFy } from '@/utils/request';

export const getClientList = async (params) => {
  return request({
    url: '/queue/cust-mgr/get-client-simple-list',
    method: 'GET',
    params
  });
};

export const getBalances = async (data) => {
  return requestFy({
    url: '/coal-customer/get-balances',
    method: 'POST',
    data
  });
};

export const getTotalBalance = async (data) => {
  return requestFy({
    url: '/coal-customer/get-total-balance',
    method: 'POST',
    data
  });
};

export const customerRecharge = async (data) => {
  return requestFy({
    url: '/coal-customer/customer-top-up',
    method: 'POST',
    data
  });
};

export const customerDeduction = async (data) => {
  return requestFy({
    url: '/coal-customer/customer-deduct-money',
    method: 'POST',
    data
  });
};

export const getBalanceById = async (id) => {
  return requestFy({
    url: `/coal-customer/get-balance-by-customerId/${id}`,
    method: 'GET'
  });
};

export const getTransactionRecord = async (data) => {
  return requestFy({
    url: '/coal-customer/transaction-record',
    method: 'POST',
    data
  });
};

export const getTransactionRecordTotal = async (data) => {
  return requestFy({
    url: '/coal-customer/transaction-record-total',
    method: 'POST',
    data
  });
};

export const getTransactionRecordDetails = async (data) => {
  return requestFy({
    url: '/coal-customer/transaction-record-details',
    method: 'POST',
    data
  });
};
